package com.hzdesk.media.matvector.koreabatch.client.my_paperless.fragment.Fragment_view;

import android.annotation.SuppressLint;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.hzdesk.media.matvector.koreabatch.client.my_paperless.R;
import com.hzdesk.media.matvector.koreabatch.client.my_paperless.custom_view.MyRecyclerView;
import com.hzdesk.media.matvector.koreabatch.client.my_paperless.fragment.BaseFragment;
import com.hzdesk.media.matvector.koreabatch.client.my_paperless.fragment.Fragment_persenter.DwonlaodPersenter;
import com.hzdesk.media.matvector.koreabatch.client.my_paperless.fragment.fragment_contract.IDwonlaodContract;

/**
 * Created by Administrator on 2018/8/10.
 * 杭州席媒科技有限公司  Developers  刘传华  10
 * 佛祖镇楼 bug辟易
 *
 * 下载列表
 */

@SuppressLint("ValidFragment")
public class DwonlaodFragment extends BaseFragment implements IDwonlaodContract.IDwonlaodView {

    private RelativeLayout rl_all_suspended;
    private TextView tv_all_suspended;
    private MyRecyclerView my_recylerview_02;
    private RelativeLayout empty_rl;
    private ImageView empty_view;
    private DwonlaodPersenter mDwonlaodPersenter = new DwonlaodPersenter(this);

    @Override
    protected void cancellationControls() {
        if(empty_view != null && empty_rl !=null && my_recylerview_02 != null){
            my_recylerview_02 = null;
            empty_rl = null;
            empty_view = null;
        }
        if(tv_all_suspended != null && rl_all_suspended != null){
            tv_all_suspended = null;
            rl_all_suspended = null;
        }
    }

    @Override
    protected void initDate() {
        tv_all_suspended.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                mDwonlaodPersenter.onClickedAllSuspended();
            }
        });
        mDwonlaodPersenter.initMyRecyclerView(my_recylerview_02,mContext);
    }

    @Override
    protected View getChildFragmentView() {
        View view = View.inflate(mContext, R.layout.fragment_download,null);
        rl_all_suspended = view.findViewById(R.id.fragment_download_rl_all_suspended);
        tv_all_suspended = view.findViewById(R.id.fragment_download_tv_all_suspended);
        my_recylerview_02 = view.findViewById(R.id.fragment_download_my_recylerview_02);

        empty_rl = view.findViewById(R.id.my_recyclerview_empty_rl);
        empty_view = view.findViewById(R.id.iv_prompt_empty_view);

        return view;
    }

    @Override
    protected void onClickedTvRight() {

    }

    @Override
    protected void onClickedIvRight() {

    }

    @Override
    protected void onClickedIvLeft() {

    }
}
